"""liukunCRM URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin

from web import views

from web.views_dir import webadmin

urlpatterns = [
    url(r'^admin/', admin.site.urls),

    url(r'^account/password/', views.password, name="password"),     # 登录
    url(r'^account/login/', views.login, name="login"),     # 登录
    url(r'^account/logout/', views.logout, name="logout"),     # 登出

    url(r'^userprofile/(?P<oper_type>\w+)/(?P<user_id>\d+)/', webadmin.userprofile_oper),    # 操作员工信息, 增删改
    url(r'^userprofile/', webadmin.userprofile, name="userprofile"),     # 用户管理

    url(r'^follow_records/(?P<oper_type>\w+)/(?P<o_id>\d+)/', webadmin.follow_records_oper),    # 跟进记录
    url(r'^follow_records_all/(?P<oper_type>\w+)/(?P<o_id>\d+)/', webadmin.follow_records_all_oper),    # 跟进记录

    url(r'^client_info/(?P<oper_type>\w+)/(?P<client_id>\d+)/', webadmin.client_info_oper),    # 操作客户信息, 增删改
    url(r'^client_info/', webadmin.client_info, name="client_info"),     # 客户管理


    url(r'^client_all_info/(?P<oper_type>\w+)/(?P<client_id>\d+)/', webadmin.client_all_info_oper),    # 操作客户信息, 增删改
    url(r'^client_all_info/', webadmin.client_all_info, name="client_all_info"),     # 客户管理

    url(r'^zuoduihua/(?P<oper_type>\w+)/(?P<o_id>\d+)/', webadmin.zuoduihua_oper),    # 操作做对话信息, 增删改
    url(r'^zuoduihua/', webadmin.zuoduihua, name="zuoduihua"),     # 做对话管理


    url(r'img_upLoad/', views.img_upLoad),
    url(r'test/', views.test),
    url(r'', views.index),


]
